package services;

import java.util.ArrayList;

public class Service {
	private String name;
	private String networkSelected;
	private String manualTemplatesSelected;
	private String authenticationSelected;
	private String ipAddressSelected;
	
	private SelectedList osSelected;
	private SelectedList autoTemplates;
	
	private MinMax hdd;
	private MinMax ram;
	private MinMax swap;
	private MinMax cpu;
	private String provider;
	
	/**
	 * 
	 * @param name
	 * @param networkSelected
	 * @param manualTemplatesSelected
	 * @param autoTemplates
	 * @param authenticationSelected
	 * @param ipAddressSelected
	 * @param osSelected
	 * @param os
	 * @param autoTemplate
	 * @param hdd
	 * @param ram
	 * @param swap
	 * @param cpu
	 */
	
	public Service(){
		this.osSelected = new SelectedList("Test", new ArrayList<String>());
		this.autoTemplates =new SelectedList("Test", new ArrayList<String>());
		this.hdd = new MinMax("Test", "test", "test");
		this.ram = new MinMax("Test", "test", "test");
		this.swap = new MinMax("Test", "test", "test");
		this.cpu= new MinMax("Test", "test", "test");
	}
	
	/**
	 * Crée un service
	 * @param name
	 * @param networkSelected
	 * @param autoTemplateSelected
	 * @param manualTemplateSelected
	 * @param authenticationSelected
	 * @param ipAdressSelected
	 * @param osSelected
	 * @param hdd
	 * @param ram
	 * @param swap
	 * @param cpu
	 */
	public Service(String name, String networkSelected,
			String manualTemplate,
			SelectedList autoTemplate,
			String authenticationSelected, String ipAdressSelected,
			SelectedList osSelected,
			MinMax hdd, MinMax ram, MinMax swap, MinMax cpu, String provider) {
		super();
		this.name = name;
		this.networkSelected = networkSelected;
		this.manualTemplatesSelected = manualTemplate;
		this.autoTemplates = autoTemplate;
		this.authenticationSelected = authenticationSelected;
		this.ipAddressSelected = ipAdressSelected;
		this.osSelected = osSelected;
		this.hdd = hdd;
		this.ram = ram;
		this.swap = swap;
		this.cpu = cpu;
		this.provider= provider;
		}
	
	public void fillString(String serviceName,String networkSelected, String manualTempalte, String authenticationSelected, String ipAdressSelected, String provider){
		this.setName(serviceName);
		this.setNetworkSelected(networkSelected);
		this.setManualTemplatesSelected(manualTempalte);
		this.setAuthenticationSelected(authenticationSelected);
		this.setIpAdressSelected(ipAdressSelected);
		this.provider = provider;
	}
	
	public void fillSelectedList(String osSelected, ArrayList<String> listOfOs,String autoTemplateSelected, ArrayList<String> listOfTemplate){
		SelectedList osList = new SelectedList(osSelected, listOfOs);
		SelectedList autoList = new SelectedList(autoTemplateSelected, listOfTemplate);
		
		this.setOsSelected(osList);
		this.setAutoTemplates(autoList);
	}
	
	public void fillMinMax(String minHdd, String maxHdd, String HddSelected, String minRam, String maxRam, String RamSelected, String minSwap, String maxSwap, String swapSelected, String minCpu, String maxCpu, String cpuSelected){
		this.setHdd(new MinMax(minHdd, maxHdd, HddSelected));
		this.setRam(new MinMax(minRam, maxRam, RamSelected));
		this.setSwap(new MinMax(minSwap, maxSwap, swapSelected));
		this.setCpu(new MinMax(minCpu, maxCpu, cpuSelected));
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getNetworkSelected() {
		return networkSelected;
	}

	public void setNetworkSelected(String networkSelected) {
		this.networkSelected = networkSelected;
	}


	public String getManualTemplatesSelected() {
		return manualTemplatesSelected;
	}

	public void setManualTemplatesSelected(String manualTemplatesSelected) {
		this.manualTemplatesSelected = manualTemplatesSelected;
	}

	public SelectedList getAutoTemplates() {
		return autoTemplates;
	}

	public void setAutoTemplates(SelectedList autoTemplates) {
		this.autoTemplates = autoTemplates;
	}

	public String getAuthenticationSelected() {
		return authenticationSelected;
	}

	public void setAuthenticationSelected(String authenticationSelected) {
		this.authenticationSelected = authenticationSelected;
	}

	public String getIpAdressSelected() {
		return ipAddressSelected;
	}

	public void setIpAdressSelected(String ipAdressSelected) {
		this.ipAddressSelected = ipAdressSelected;
	}

	public SelectedList getOsSelected() {
		return osSelected;
	}

	public void setOsSelected(SelectedList osSelected) {
		this.osSelected = osSelected;
	}

	public MinMax getHdd() {
		return hdd;
	}

	public void setHdd(MinMax hdd) {
		this.hdd = hdd;
	}

	public MinMax getRam() {
		return ram;
	}

	public void setRam(MinMax ram) {
		this.ram = ram;
	}

	public MinMax getSwap() {
		return swap;
	}

	public void setSwap(MinMax swap) {
		this.swap = swap;
	}

	public MinMax getCpu() {
		return cpu;
	}

	public void setCpu(MinMax cpu) {
		this.cpu = cpu;
	}

	public String getProvider() {
		return provider;
	}
	
	public void setProvider(String provider) {
		this.provider = provider;
	}
	

	
	
}
